package com.itheima.job.controller;

import com.itheima.job.dto.EmailDTO;
import com.itheima.job.result.Result;
import com.itheima.job.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author byZhao
 * @motto Talk is cheap . Show me the code!
 * @modify 2021-11-27 11:38
 * @description
 */
@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    EmailService emailService;

    @PostMapping
    public Result sendEmail(@RequestBody EmailDTO emailDTO){
        return emailService.sendEmail(emailDTO);
    }


}
